[POWERPC][XEN] Fix yaboot loading and other linker script tweaks.
authorHollis Blanchard <hollisb@us.ibm.com>
Fri, 6 Oct 2006 17:15:06 +0000 (12:15 -0500)
committerHollis Blanchard <hollisb@us.ibm.com>
Fri, 6 Oct 2006 17:15:06 +0000 (12:15 -0500)
yaboot refuses to load segments at file offset 0, so move the ELF headers out
of our text segment. Also hardcode the link address in the linker script, and
remove the now-inaccurate start/end comments.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
--HG--
extra : transplant_source : %A4%1B%8C%D0%1A%D2%87%D6%0A%5EY%CC%FF%A2%3B%5D%D8%83z%F8

xen/arch/powerpc/Makefile
xen/arch/powerpc/xen.lds.S

index f5dc88d7f6ef4dab54255935c21c7112611634c5..b03c9f0bc01e988c8e4f452b34d37204b5341272 100644 (file)
@@ -96,7 +96,7 @@ endif
 cmdline.o: cmdline.dep
 cmdline.o: CFLAGS += -DCMDLINE="\"$(FULL_CMDLINE)\""
 
-TARGET_OPTS = $(OMAGIC) -Wl,-Ttext,0x400000,-T,xen.lds
+TARGET_OPTS = $(OMAGIC) -Wl,-T,xen.lds
 TARGET_OPTS += start.o $(ALL_OBJS)
 
 .xen-syms: start.o $(ALL_OBJS) xen.lds
index ea2e56725ae123528f230a1734f59637c060f300..2fe00d7b606aed727bdbab91e8af0fa7e618590f 100644 (file)
@@ -12,12 +12,12 @@ SEARCH_DIR("=/usr/local/lib64"); SEARCH_DIR("=/lib64"); SEARCH_DIR("=/usr/lib64"
    __DYNAMIC = 0;    */
 PHDRS
 {
-  text PT_LOAD FILEHDR PHDRS;
+  text PT_LOAD;
 }   
 SECTIONS
 {
+  . = 0x00400000;
   /* Read-only sections, merged into text segment: */
-  PROVIDE (__executable_start = 0x10000000); . = 0x10000000 + SIZEOF_HEADERS;
   .interp         : { *(.interp) } :text
   .hash           : { *(.hash) }
   .dynsym         : { *(.dynsym) }
@@ -111,8 +111,6 @@ SECTIONS
     SORT(CONSTRUCTORS)
   }
 
-  /* Xen addition */
-
   . = ALIGN(32);
   __setup_start = .;
   .setup.init : { *(.setup.init) }
@@ -131,8 +129,6 @@ SECTIONS
   . = ALIGN(STACK_SIZE);
   __per_cpu_end = .;
 
-  /* end Xen addition */
-
   .data1          : { *(.data1) }
   .tdata         : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
   .tbss                  : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }